package io.github.talelin.latticy.service;

import io.github.talelin.latticy.mapper.BannerMapper;
import io.github.talelin.latticy.model.BannerDO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TestSleeveService {

    @Autowired
    private BannerMapper bannerMapper;

    public List<BannerDO> getBanners(){
        return bannerMapper.getBannerAll();
    }

    public long insertBanner() {
        BannerDO banner = new BannerDO();
        banner.setName("newBanner");
        banner.setTitle("newTitle");

        return bannerMapper.insertBanner(banner);
    }
}
